package com.hzf.material.dao.mapper;

import com.github.wenhao.geohash.domain.GeoRange;
import com.hzf.material.dao.model.MaterialGoods;
import com.hzf.material.dao.model.MaterialGoodsExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MaterialGoodsMapper {
    long countByExample(MaterialGoodsExample example);
    long countByCityExample(MaterialGoodsExample example);
    int deleteByExample(MaterialGoodsExample example);

    int deleteByPrimaryKey(Integer goodsId);

    int insert(MaterialGoods record);

    int insertSelective(MaterialGoods record);

    List<MaterialGoods> selectByExample(MaterialGoodsExample example);

    MaterialGoods selectByPrimaryKey(Integer goodsId);

    int updateByExampleSelective(@Param("record") MaterialGoods record, @Param("example") MaterialGoodsExample example);

    int updateByExample(@Param("record") MaterialGoods record, @Param("example") MaterialGoodsExample example);

    int updateByPrimaryKeySelective(MaterialGoods record);

    int updateByPrimaryKey(MaterialGoods record);

    List<MaterialGoods> selectByPrimaryCity(MaterialGoodsExample  example);
    List<MaterialGoods> selectByPrimaryDistance(@Param("regionNumber")int regionNumber, @Param("typeId")int typeId, @Param("status")int status,
                                                @Param("min0")long min0,@Param("max0")long max0,
                                                @Param("min1")long min1,@Param("max1")long max1,
                                                @Param("min2")long min2,@Param("max2")long max2,
                                                @Param("min3")long min3, @Param("max3")long max3,
                                                @Param("min4")long min4, @Param("max4")long max4,
                                                @Param("min5")long min5, @Param("max5")long max5,
                                                @Param("min6")long min6, @Param("max6")long max6,
                                                @Param("min7")long min7, @Param("max7")long max7,
                                                @Param("min8")long min8, @Param("max8")long max8);


}